Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/santiagodc8/tu_perfil.net/llms.txt

Use this file to discover all available pages before exploring further.

The newsletter section at /admin/newsletter lets you compose and send an email broadcast to all active subscribers. Delivery is handled by Resend.
This page is only accessible to users with the admin role. Editors are redirected to the dashboard.

Before you send

The top of the page shows the number of active subscribers who will receive the email. If that count is zero, the send button is disabled. Add subscribers by asking readers to sign up through the newsletter widget on the public site, or manage them at /admin/suscriptores.

Composing a newsletter

1

Write the subject

Enter the email subject in the Asunto del email field. Maximum 150 characters. Example: Resumen semanal de noticias — TuPerfil.net.
2

Write the content

Type the newsletter body in the Contenido del newsletter text area. You can use line breaks to separate paragraphs — they are preserved in the final email. Plain text is recommended for maximum compatibility across email clients.
3

Click the send button

The button shows exactly how many subscribers will receive the email: Enviar newsletter a N suscriptores.
4

Confirm the send

A confirmation panel appears asking you to confirm the action. Click Sí, enviar ahora to proceed, or Cancelar to go back and edit.
Sending cannot be undone. The email is delivered to all active subscribers immediately.
5

Check the result

After sending, a result message shows how many emails were delivered successfully and how many failed (if any). On success, the subject and content fields are cleared.

How delivery works

  • The send button calls POST /api/newsletter/send with the subject and body.
  • The API fetches all subscribers where active = true, then sends individual emails via the Resend API.
  • Every email includes an unsubscribe link at the bottom, generated automatically. Clicking it sets active = false and records unsubscribed_at for that subscriber.
  • Emails are sent from the address configured in the RESEND_FROM_EMAIL environment variable (defaults to noticias@tuperfil.net).

Notifying subscribers from an article

You do not need to visit this page to send a notification about a specific article. When creating or editing an article, enable the Notificar suscriptores toggle (visible only when the article is set to Publicada and not scheduled). Saving the article triggers POST /api/newsletter/notify with the article title, excerpt, and featured image.

Newsletter fields reference

FieldMax lengthNotes
Subject150 charsRequired to enable the send button.
BodyUnlimitedPlain text. Line breaks are preserved.